<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
        x:Class="OpenLS.UI.Themes.NumericUpDownResources"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:UI="clr-namespace:OpenLS.UI"
    xmlns:Internals="clr-namespace:OpenLS.UI.Internals">

    <Style TargetType="{x:Type RepeatButton}" x:Key="rbs">
        <!--<Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True" /> -->
        <Setter Property="Panel.Background" Value="#00FFFFFF" />
        <Setter Property="UIElement.Focusable" Value="False" />
        <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border BorderBrush="Black" BorderThickness="1" Padding="2" Background="{TemplateBinding Background}">
                        <ContentPresenter></ContentPresenter>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type UI:NumericUpDown}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type UI:NumericUpDown}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            >
                        <Grid Height="20" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"></RowDefinition>
                                <RowDefinition Height="0"/>
                                <RowDefinition Height="*"></RowDefinition>
                            </Grid.RowDefinitions>
                            <TextBox  Grid.RowSpan="3" Name="TextBox_Part">
                                <TextBox.Text>
                                    <MultiBinding Mode="OneWay" Converter="{x:Static UI:OfficeConverters.FormattingConverter}"  >
                                        <Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}"/>
                                        <Binding Path="Format" RelativeSource="{RelativeSource TemplatedParent}"/>
                                    </MultiBinding>
                                </TextBox.Text>
                            </TextBox>
                            <RepeatButton Name="Increase_Part" Grid.Row="0" Grid.Column="1" Style="{StaticResource rbs}">
                                <Polygon Points="3,0 6,3 0,3" Fill="#FF000000" SnapsToDevicePixels="true" />
                            </RepeatButton>
                            <RepeatButton Name="Decrease_Part" Grid.Row="2" Grid.Column="1" Style="{StaticResource rbs}">
                                <Polygon Points="3,3 6,0 0,0" Fill="#FF000000" SnapsToDevicePixels="true" />
                            </RepeatButton>

                        </Grid>

                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>